import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
export const useCounterStore = defineStore('counter', {
  state: () => ({
    count: 0
  }),
  getters: {
    doubleCount(state) {
      return state.count * 2
    }
  },
  actions: {
    increment(newConter: number) {
      this.count = newConter
    }
  }
})
// import { defineStore } from 'pinia'
// export const useCounterStore = defineStore('counter', () => {
//   return {
//     state: () => ({
//       count:0
//     }),
//     getters:{
//       doubleCount(state) {
//         return state.count*2
//       }
//     }
//   }
// })
